﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="initial-scale=1.0" />
	<script src="https://cdn.bootcss.com/three.js/r63/three.min.js"></script>
	<script src="photo-sphere-viewer.min.js"></script>
	<style>
		    html, body {
		        margin: 0;
		        width: 100%;
		        height: 100%;
		        overflow: hidden;
		    }
		    #container {
		        width: 100%;
		        height: 100%;
		    }
		</style>
</head>
<body>
<div id="container"></div>
<script>
		window.onload = function () {
				getQueryString("url")
		};
			function getQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
				var r = window.location.search.substr(1).match(reg);
				console.log(r[2])
				if (r != null){
					var div = document.getElementById('container');
					var PSV = new PhotoSphereViewer({
						panorama: r[2],
						container: div,
						time_anim: false,
						navbar: true,
						navbar_style: {
							backgroundColor: 'rgba(58, 67, 77, 0.7)'
						},
					});
				};
			}
		</script>
</body>
</html>